﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Bootstrap.MVC.Resources;

namespace Bootstrap.MVC.Utils
{
    public static class Guard
    {
        public static void IsNotNull(dynamic param, string paramName)
        {
            if (param == null) throw new ArgumentNullException(Messages.ShouldNoTBeNull.FormatWith(paramName));
        }

        public static void IsNotNullOrEmpty(string param, string paramName)
        {
            if (string.IsNullOrEmpty(param)) throw new ArgumentNullException( Messages.ShouldNotBeNullOrEmpty.FormatWith(paramName));
        }
    }
}
